{% extends "base.html" %}


{% block headtitle %}Admin: Trips{% endblock %}
{% block pagetitle %}Admin: Trips{% endblock %}

{% block content %}

<button onclick="location.href='{% url admin_trip_add %}'">Add Trip</button>

<table class="triplist">
    <tr>
      <th>Ski Season</th>
      <th>Trip</th>
      <th>Description</th>
      <th>Price</th>
      <th>Start Date</th>
      <th>End Date</th>
      <th>Member Only?</th>
      <th> </th>
    </tr>
  {% for trip in trips %}
    <tr>
      <td>{{ trip.ski_season }}</td>
      <td>{{ trip.trip_number }}</td>
      <td>{{ trip.description }}</td>
      <td>$ {{ trip.price|floatformat:2 }}</td>
      <td>{{ trip.start_date }}</td>
      <td>{{ trip.end_date }}</td>
      <td>{{ trip.is_member_only }}</td>
      <td>
        <a href="{% url admin_trip_update trip.key.id %}">Edit</a> / 
        Delete 
      </td>
    </tr>
  {% endfor %}
</table>
{% endblock %}
